<template>
    <view class="xilu">
        <u-navbar :safeAreaInsetTop="true" :leftIconSize="0" :placeholder="true" bgColor="#F9C022" title="我要发布">
        </u-navbar>
        <Footer :footState="2" :num="messageCount"></Footer>
        <view class="container">
            <view class="xilu_bg_block"></view>
            <view class="xilu_content">
                <view class="fs44 col10 pb20 fwb">二手闲置</view>
                <view class="fs28 col89 pb80">请勿发布违规内容</view>
                <view @click="jump('/discovery/public_tiezi/public_tiezi',1)" class="item mb30 flex-box">
                    <image src="/static/icon/want_public1.png" mode="aspectFill" class="xilu_public"></image>
                    <view class="flex-grow-1">
                        <view class="fs36 col10 pb10">发布帖子</view>
                        <view class="fs30 col89">分享你的精彩生活</view>
                    </view>
                </view>
                <view @click="jump('/pages/public_xianzhi/public_xianzhi',2)" class="item mb30 flex-box">
                    <image src="/static/icon/want_public2.png" mode="aspectFill" class="xilu_public"></image>
                    <view class="flex-grow-1">
                        <view class="fs36 col10 pb10">发布闲置</view>
                        <view class="fs30 col89">让你的闲置物品不在积灰</view>
                    </view>
                </view>
                <view @click="jump('/pages/public_huishou/public_huishou',2)" class="item mb30 flex-box">
                    <image src="/static/icon/want_public3.png" mode="aspectFill" class="xilu_public"></image>
                    <view class="flex-grow-1">
                        <view class="fs36 col10 pb10">高价回收</view>
                        <view class="fs30 col89">轻奢潮品高价回收</view>
                    </view>
                </view>
            </view>
        </view>
    </view>
</template>

<script>
    import Footer from "@/components/footer/footer.vue";
	const chatIM = require('../../xilu/chat.js');
    export default {
        components: {
            Footer,
        },
        data() {
            return {
				messageCount:0
            };
        },
		onLoad() {
			let page = this;
			uni.$on("unread_count",function(data){
				page.messageCount = getApp().globalData.chat_config.messageCount
			});
			if (getApp().globalData.chat_config.SocketTask) {
			   chatIM.setMessageBadge(false)
			}
		},
		onUnload() {
			uni.$off("unread_count");
		},
		onShareAppMessage() {
			
		},
		onShareTimeline() {
			
		},
		methods: {
			jump(url,needLogin){
				if(needLogin){
					if(!this.$core.getUserinfo(true)){
						return true;
					}
				}
				if(needLogin == 2){
					this.$core.checkAuth(function(){
						uni.navigateTo({
							url: url
						})
					})
				}else{
					uni.navigateTo({
						url: url
					})
				}
			},
		}
    }
</script>

<style lang="scss" scoped>
    .xilu {
        &_logo {
            width: 80rpx;
            height: 80rpx;
        }

        &_center_slot {
            width: 402rpx;
            height: 75rpx;
            background: #FFFFFF;
            border-radius: 40rpx;
            border: 2rpx solid #555555;
            margin-left: -60rpx;
            padding: 0 12rpx 0 20rpx;
        }

        &_bg {
            width: 750rpx;
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            z-index: 2;
        }

        &_bg_block {
            width: 750rpx;
            height: calc(1003rpx - 44px - var(--status-bar-height));
            background: linear-gradient(180deg, #F9C022 0%, rgba(255, 193, 0, 0) 100%);
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            z-index: 2;
        }

        &_content {
            position: relative;
            z-index: 4;
            padding: 40rpx 30rpx 0;
        }

        .container {
            min-height: 1000rpx;
        }

        &_public {
            width: 100rpx;
            height: 100rpx;
            margin-right: 30rpx;
        }

        .item {
            width: 690rpx;
            height: 180rpx;
            background: #FFFFFF;
            box-shadow: 0rpx 4rpx 20rpx 5rpx rgba(183, 189, 202, 0.05);
            border-radius: 20rpx;
            padding: 0 30rpx;

            &::after {
                content: "";
                display: block;
                background: url(../../static/icon/placeorder_right2.png) no-repeat center;
                background-size: 100%;
                width: 35rpx;
                height: 35rpx;
            }
        }
    }
</style>
